/**
 * @desc
 *
 * @使用场景
 *
 * @author  杨晓东[of1081]
 * @company qianmi.com
 * @Date    16/10/20
 **/
'use strict';
let co  = require('co');
let ossClient = require('../oss').getOssClient({
  "prefixUrl":"http://oss-hz.qianmi.com",
  "accessKeyId": "1yzuSWW5owwEYcCI",
  "accessKeySecret": "oQnsEeeg6LAhJDWZEdWmGFNxcs3KVF",
  "path":"x-site/test",
  "timeout":15000
});

co(function * () {
  // x-site/prod/d2cStore/A1395623
  let result  = yield ossClient.listObjectAbsolute({
    prefix:"x-site/prod/d2cStore/A1395623"
    ,"max-keys":1000,
    // delimiter:'/'
  });
  
  result.objects.forEach(ossItem=>{
    console.log(ossItem.name);
  });
  
  //http://oss-hz.qianmi.com/x-site/test/d2cStore/A857569/view/pc/index/1476964305596.html
  
  // let delResult  = yield ossClient.delMultiObjectAbsolute(['x-site/test/d2cStore/A857569/view/pc/common/common_0.719915458365201.css']);
  // console.log(delResult);
  // delResult.deleted.forEach(delOssItem=>{
  //   console.log('已删除文件::',delOssItem);
  // });
});